/* ============================================
   UNIVERSAL CSS - All Pages (Index, Product, Category, Checkout)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4a90e2;
    --secondary: #6c5ce7;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #2d3436;
    --light: #636e72;
    --bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.15);
    --admin-reply: #e8f4fd;
    --admin-border: #4a00e0;
}

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ========== COMMON CONTAINERS ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--light);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .active {
    color: var(--dark);
    font-weight: 600;
}

/* ========== SECTION TITLE ========== */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 25px 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========== MESSAGES ========== */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid var(--success);
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid var(--danger);
}

.rating-message {
    font-size: 13px;
    padding: 8px 15px;
    border-radius: 20px;
    animation: fadeIn 0.3s;
    display: inline-block;
}

.rating-message.success {
    background: #d4edda;
    color: #155724;
}

.rating-message.error {
    background: #f8d7da;
    color: #721c24;
}

.rating-message.warning {
    background: #fff3cd;
    color: #856404;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ========== POPULAR PRODUCTS SLIDER ========== */
.popular-slider {
    margin-bottom: 45px;
    background: #f9f9ff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
}

.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    flex: 0 0 100%;
    min-width: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.slide-content {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    transition: all 0.3s;
}

.slide-image {
    flex: 0 0 200px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 25px;
}

.slide-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.slider-slide:hover .slide-image img {
    transform: scale(1.05);
}

.slide-info {
    flex: 1;
}

.slide-category {
    display: inline-block;
    background: #667eea20;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.slide-title {
    font-size: 22px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 8px;
    line-height: 1.3;
}

.slide-description {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

.slider-btn:hover {
    background: #667eea;
    color: white;
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background: #667eea;
    transform: scale(1.2);
}

/* ========== CATEGORIES GRID ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 45px;
}

.category-card-link {
    text-decoration: none;
    display: block;
}

.category-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.category-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
    transition: color 0.3s ease;
    font-weight: 600;
    line-height: 1.3;
}

.category-card p {
    color: #666;
    margin-bottom: 0;
    font-size: 12px;
    transition: color 0.3s ease;
    line-height: 1.3;
}

/* ========== PRODUCTS LIST (COMMON) ========== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

.product-list-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 3px solid #3d3af0;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
}

.product-list-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    border-color: #f29924;
}

.product-list-image-wrapper {
    width: 220px;
    height: 220px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    flex-shrink: 0;
    border-right: 1px solid #f0f0f0;
}

.product-list-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-list-item:hover .product-list-image {
    transform: scale(1.05);
}

.product-list-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

.product-time {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge {
    color: #667eea;
    font-weight: 600;
    background: #f0f0ff;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.time-separator {
    color: #ccc;
    font-weight: bold;
}

.time-text {
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-list-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
    padding-right: 40px;
}

.product-list-title a {
    color: #667eea;
    text-decoration: none;
}

.product-list-title a:hover {
    text-decoration: underline;
}

.product-list-filename {
    font-size: 14px;
    color: #6c757d;
    font-family: monospace;
    margin-bottom: 8px;
    word-break: break-all;
}

.product-list-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-list-more {
    color: #667eea;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    align-self: flex-start;
    margin-bottom: 15px;
}

.product-list-more:hover {
    text-decoration: underline;
}

/* FREE & PRICE BADGES */
.free-badge {
    display: inline-block;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 25px;
    font-weight: 700;
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

.price-badge {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 10px;
}

.free-badge-small {
    display: inline-block;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 21px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

.price-badge-small {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.product-list-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 5px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    gap: 10px;
}

.price-info {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.btn-view-details {
    padding: 8px 25px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.btn-view-details:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ========== SHARE BUTTON ========== */
.btn-share-top {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e0e0e0;
    margin-left: 10px;
    flex-shrink: 0;
}

.btn-share-top:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.btn-share-top svg {
    width: 16px;
    height: 16px;
    fill: #666;
}

.share-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: #16213e;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ff9800;
}

.share-dropdown.active {
    display: block;
}

.share-option {
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
}

.share-option:last-child {
    border-bottom: none;
}

.share-option:hover {
    background: #ff9800;
    color: #16213e;
    padding-left: 30px;
}

.share-option svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ========== FILTER BUTTONS ========== */
.category-filter {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 5px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.pagination a {
    background: white;
    color: #667eea;
    border: 1px solid #e0e0e0;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination span.current {
    background: #667eea;
    color: white;
    border: 1px solid #667eea;
}

.pagination .prev-page, .pagination .next-page {
    padding: 0 15px;
}

/* ========== NO PRODUCTS ========== */
.no-products {
    text-align: center;
    padding: 60px;
    background: #f8f9fa;
    border-radius: 15px;
    color: #666;
    font-size: 18px;
    width: 100%;
}

/* ========== SUBCATEGORIES GRID ========== */
.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.subcat-card-link {
    text-decoration: none;
    display: block;
}

.subcat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.subcat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.subcat-card h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.subcat-card p {
    color: #666;
}

.subcat-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ========== SEARCH BOX ========== */
.search-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    display: flex;
    gap: 15px;
}

.search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
}

.search-input:focus {
    border-color: #667eea;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.search-btn:hover {
    opacity: 0.9;
}

/* ========== PRODUCT DETAIL PAGE STYLES ========== */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 40px;
}

.image-section {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.image-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.main-image {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #eee;
}

.info-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.product-category {
    display: inline-block;
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Downloads Section */
.downloads-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
    box-shadow: var(--shadow);
}

.downloads-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.downloads-title i {
    color: var(--success);
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.download-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.download-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.download-info {
    flex: 1;
}

.download-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 15px;
    margin-bottom: 4px;
}

.download-size {
    font-size: 12px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn {
    padding: 8px 20px;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.download-btn.login-required {
    background: var(--primary);
}

.price-block {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.product-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.product-price.free {
    color: var(--success);
}

.price-info {
    font-size: 12px;
    color: var(--light);
    margin-top: 5px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 160px;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #3a7fc4;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-share {
    background: #25D366;
    color: white;
}

.login-message {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 5px solid var(--warning);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.spec-label {
    font-size: 11px;
    color: var(--light);
    text-transform: uppercase;
}

.spec-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

/* Rating Section */
.rating-section {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
}

.rating-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: start;
}

.rating-average-box {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
}

.rating-big-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.rating-stars-big i {
    font-size: 24px;
    color: #ffc107;
    margin: 0 2px;
}

.rating-total {
    color: var(--light);
    font-size: 14px;
    margin-top: 8px;
}

.rating-breakdown {
    padding: 10px 0;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.rating-bar-item:hover {
    transform: translateX(5px);
}

.rating-star-label {
    width: 70px;
    font-size: 14px;
    color: var(--dark);
}

.rating-star-label i {
    color: #ffc107;
    font-size: 12px;
    margin-right: 2px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ffb300);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-percent {
    width: 45px;
    font-size: 14px;
    color: var(--light);
    text-align: right;
}

.rating-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.user-rating-status {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rate-stars {
    display: inline-flex;
    gap: 5px;
    cursor: pointer;
}

.rate-stars i {
    font-size: 24px;
    color: #ddd;
    transition: all 0.2s;
}

.rate-stars i:hover,
.rate-stars i.hover {
    color: #ffc107;
    transform: scale(1.1);
}

.rate-stars i.selected {
    color: #ffc107;
}

.write-review-btn {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.write-review-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
}

/* Review Modal */
.review-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

.review-modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s;
    overflow: hidden;
}

.review-modal-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.review-modal-close {
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: 0.3s;
}

.review-modal-body {
    padding: 25px;
}

.review-stars {
    display: inline-flex;
    gap: 8px;
    cursor: pointer;
}

.review-stars i {
    font-size: 32px;
    color: #ddd;
    transition: all 0.2s;
}

.review-stars i:hover,
.review-stars i.selected {
    color: #ffc107;
    transform: scale(1.1);
}

.review-comment textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
}

.review-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    transition: 0.3s;
}

/* Description */
.description-text {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.7;
    color: #444;
}

/* Demo Images */
.demo-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.demo-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.demo-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.demo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.demo-wrapper {
    width: 100%;
    height: 500px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.demo-caption {
    padding: 15px;
    text-align: center;
    background: #fff;
    border-top: 1px solid #eee;
}

/* Comments Section */
.comments-section {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.comments-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.comment-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.comments-list {
    margin-top: 20px;
}

.comment-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    transition: 0.3s;
}

.comment-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
}

.comment-user-info {
    flex: 1;
}

.comment-user-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 16px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-date {
    font-size: 12px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-text {
    color: #444;
    line-height: 1.6;
    font-size: 15px;
    padding-left: 60px;
    word-wrap: break-word;
}

.admin-reply {
    background: var(--admin-reply);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    margin-left: 60px;
    border-left: 4px solid var(--admin-border);
    position: relative;
}

.admin-reply-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--admin-border);
    font-weight: 600;
}

.guidelines {
    font-size: 13px;
    color: var(--light);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Related Products */
.related-section {
    margin-top: 50px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid transparent;
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.related-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.related-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.free-tag {
    background: var(--success);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}

.view-btn {
    display: block;
    padding: 10px;
    background: #f1f2f6;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: 0.3s;
}

.view-btn:hover {
    background: var(--primary);
    color: white;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.share-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
}

.share-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.share-option:hover {
    transform: translateY(-5px);
}

.share-option i {
    font-size: 32px;
    margin-bottom: 8px;
}

.copy-link {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.copy-link input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox-caption {
    text-align: center;
    color: #ccc;
    padding: 10px;
    position: absolute;
    bottom: 20px;
    width: 100%;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    color: white;
    font-size: 30px;
    background: rgba(0,0,0,0.3);
}

.lightbox-next {
    right: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--white);
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-hover);
    position: relative;
    animation: slideIn 0.3s;
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--light);
}

/* ========== CHECKOUT PAGE STYLES ========== */
.checkout-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.page-heading {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #333;
}

.login-status {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c8e6c9;
}

.main-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.main-card h3 {
    margin-top: 0;
    color: #444;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.product-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    align-items: center;
}

.product-preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.product-preview-info {
    flex: 1;
}

.product-preview-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ff9800;
    outline: none;
}

.summary-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table td {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-table .total-row {
    font-weight: bold;
    font-size: 18px;
    color: #ff9800;
}

.file-info {
    background: #e8f0fe;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.btn-pay {
    width: 100%;
    padding: 14px;
    background-color: #28b324;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-pay:hover {
    background-color: #0ec408;
    transform: translateY(-2px);
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #ff9800;
}

.back-link:hover {
    text-decoration: underline;
}

.free-checkout-badge {
    background: #28a745;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
    }
    
    .image-section {
        position: static;
    }
    
    .rating-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-list-item {
        flex-direction: column;
    }
    
    .product-list-image-wrapper {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .product-list-title {
        padding-right: 0;
    }
    
    .product-header {
        flex-wrap: wrap;
    }
    
    .product-list-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .price-info {
        margin-right: 0;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .btn-view-details {
        width: 100%;
    }
    
    .category-image {
        width: 60px;
        height: 60px;
    }
    
    .slide-content {
        flex-direction: column;
        padding: 15px;
    }
    
    .slide-image {
        flex: 0 0 auto;
        width: 100%;
        height: 140px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .slide-title {
        font-size: 18px;
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .admin-reply {
        margin-left: 0;
    }
    
    .comment-text {
        padding-left: 0;
    }
    
    .review-modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .download-item {
        flex-wrap: wrap;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }
    
    .download-info {
        flex: 1 1 100%;
    }
    
    .pagination a, .pagination span {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .demo-wrapper {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-card h3 {
        font-size: 13px;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .share-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}