/* Product Detail Page Styles */
:root {
    --primary-color: #4195da;
    --secondary-color: #176cb7;
    --accent-color: #f4b400;
    --success-color: #1e8e3e;
    --danger-color: #db4437;
    --dark-text: #333;
    --medium-text: #666;
    --light-text: #999;
    --border-color: #e0e0e0;
    --light-bg: #f8f9fa;
    --white: #fff;
}

/* Breadcrumb styles */
.breadcrumb {
    background-color: var(--light-bg);
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    color: var(--medium-text);
    font-size: 14px;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--light-text);
}

.breadcrumb a {
    color: var(--medium-text);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb li.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* Product Main Layout */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.main-image {
    position: relative;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sale-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--danger-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}

.thumbnail:hover {
    opacity: 0.9;
}

.thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0 0 15px 0;
}

.product-meta {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

.product-meta span {
    color: var(--medium-text);
    font-size: 14px;
    margin-right: 20px;
}

.product-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.product-meta a:hover {
    text-decoration: underline;
}

.product-price {
    margin-bottom: 20px;
}

.current-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-text);
}

.regular-price {
    font-size: 18px;
    color: var(--light-text);
    text-decoration: line-through;
    margin-right: 10px;
}

.sale-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--danger-color);
}

.stock-status {
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.stock-status i {
    margin-right: 8px;
}

.stock-status.in-stock {
    background-color: rgba(30, 142, 62, 0.1);
    color: var(--success-color);
}

.stock-status.out-of-stock {
    background-color: rgba(219, 68, 55, 0.1);
    color: var(--danger-color);
}

.product-description {
    margin-bottom: 25px;
    color: var(--medium-text);
    line-height: 1.6;
}

/* Add to cart form */
.add-to-cart-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: var(--light-bg);
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    color: var(--dark-text);
}

.quantity-btn:hover {
    background-color: var(--border-color);
}

.quantity-input {
    width: 50px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 14px;
    color: var(--dark-text);
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    transition: background-color 0.2s;
    height: 40px;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.product-actions {
    display: flex;
    gap: 15px;
}

.btn-wishlist,
.btn-share {
    background: none;
    border: none;
    color: var(--medium-text);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.btn-wishlist i,
.btn-share i {
    margin-right: 5px;
}

.btn-wishlist:hover,
.btn-share:hover {
    color: var(--primary-color);
}

/* Product Tabs */
.product-tabs {
    margin-bottom: 60px;
}

.tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
}

.tabs-nav li {
    padding: 15px 25px;
    color: var(--medium-text);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tabs-nav li:hover {
    color: var(--primary-color);
}

.tabs-nav li.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-pane {
    display: none;
    padding: 30px 0;
}

.tab-pane.active {
    display: block;
}

.tab-content {
    color: var(--medium-text);
    line-height: 1.6;
}

/* Product attributes table */
.product-attributes {
    width: 100%;
    border-collapse: collapse;
}

.product-attributes th,
.product-attributes td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.product-attributes th {
    width: 30%;
    background-color: var(--light-bg);
    font-weight: 500;
}

/* Review Form */
.write-review {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.write-review h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--dark-text);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.rating-stars {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.rating-stars i {
    color: var(--accent-color);
    font-size: 24px;
    cursor: pointer;
}

/* Related Products */
.related-products {
    margin-bottom: 60px;
}

.related-products h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--white);
    transition: box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--dark-text);
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .product-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
}

.product-card .btn-quick-view,
.product-card .btn-add-to-cart,
.product-card .btn-wishlist {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--medium-text);
    cursor: pointer;
    transition: all 0.2s;
}

.product-card .btn-quick-view:hover,
.product-card .btn-add-to-cart:hover,
.product-card .btn-wishlist:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 10% auto;
    padding: 30px;
    width: 80%;
    max-width: 900px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: var(--light-text);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--dark-text);
}

.loading {
    text-align: center;
    padding: 30px;
    color: var(--medium-text);
}

.error {
    text-align: center;
    padding: 30px;
    color: var(--danger-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .main-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .tabs-nav {
        flex-direction: column;
    }
    
    .tabs-nav li {
        padding: 10px 15px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .tabs-nav li.active {
        border-bottom: 1px solid var(--primary-color);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-price {
        flex-direction: column;
    }
    
    .regular-price {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .add-to-cart-form {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Images Container */
.product-images-container {
    width: 100%;
}

/* Thumbnails for product.php */
.product-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.product-thumbnails .thumbnail {
    width: 70px;
    height: 70px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.product-thumbnails .thumbnail:hover {
    opacity: 0.9;
}

.product-thumbnails .thumbnail.active {
    border-color: var(--primary-color);
    opacity: 1;
}

.product-thumbnails .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
} 