body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: #222;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.header {
    background-color: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #222;
    text-decoration: none;
}

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navigation li {
    margin-left: 25px;
}

.navigation a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.navigation a:hover {
    color: #007aff;
}

.hero {
    background-color: #ffffff;
    text-align: center;
    padding: 80px 20px;
    border-bottom: 1px solid #eeeeee;
}

.hero h1 {
    font-size: 48px;
    font-weight: 300;
    margin-top: 0;
    margin-bottom: 10px;
    color: #111;
}

.hero p {
    font-size: 20px;
    color: #555;
    margin-bottom: 30px;
}

.featured-products, .shop-page {
    padding: 60px 0;
}

.shop-page h1, .featured-products h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 50px;
    margin-top: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; 
}

.product-card {
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.product-card h3 {
    font-size: 22px;
    font-weight: 500;
    margin: 20px 0 10px 0;
}

.product-card .description {
    font-size: 15px;
    color: #666;
    padding: 0 20px;
    margin-bottom: 15px;
}

.product-card .price {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 20px;
}

.product-page {
    padding: 60px 0;
}

.product-content {
    display: flex;
    gap: 40px;
}

.product-gallery, .product-info {
    flex: 1;
}

.product-info h1 {
    font-size: 36px;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 15px;
}

.product-price {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: #222;
    margin-bottom: 25px;
}

.product-description {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

.product-details {
    font-size: 15px;
    line-height: 1.8;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 25px 0;
    color: #333;
}

.product-gallery-slider {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.slider-main-image {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    min-height: 450px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.slider-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.slider-button {
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-button:hover {
    background-color: #f9f9f9;
    border-color: #222;
}

.slider-counter {
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #f4f4f4;
    padding: 5px;
    border-radius: 8px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    color: #555;
}

.mode-btn.active {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #000;
    font-weight: bold;
}

.constructor-grid {
    display: none; 
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
}

.constructor-grid.visible {
    display: grid;
}

.constructor-item {
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.constructor-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.7;
}

.constructor-item.selected {
    border-color: #222;
}

.constructor-item.selected img {
    opacity: 1;
}

.check-mark {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #222;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
}

.constructor-item.selected .check-mark {
    display: flex;
}

.price-summary {
    background: #fafafa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px dashed #ccc;
}

.cta-button, .buy-button {
    display: inline-block;
    background: linear-gradient(45deg, #111, #333);
    color: #ffffff;
    padding: 16px 35px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 20px;
    width: 100%; 
    box-sizing: border-box;
    text-align: center;
}

.cta-button.disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.cta-button:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #000, #222);
}

.cta-button:active:not(.disabled) {
    transform: translateY(1px);
}

.product-card .buy-button {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    padding: 10px 25px;
    font-size: 15px;
    width: auto;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    margin-bottom: 25px;
}

.product-card .buy-button:hover {
    background-color: #f9f9f9;
    border-color: #222;
}

.cart-modal {
    display: none;       
    position: fixed;     
    z-index: 9999;       
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}

.cart-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    animation: slideDown 0.3s ease-out;
    color: #333;
}

@keyframes slideDown {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.close-cart {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    line-height: 20px;
}

.close-cart:hover { color: #000; }

.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.cart-item-img {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-button {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
    display: block;
}

.checkout-button:hover { background-color: #444; }

.continue-shopping {
    background: none;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    width: 100%;
}

.continue-shopping:hover { background-color: #f9f9f9; }

.secure-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 15px;
}

.text-page { padding: 60px 0; }
.text-page .container { max-width: 800px; }
.text-page h1 { font-size: 36px; font-weight: 300; margin-bottom: 40px; text-align: center; }
.text-page h3 { margin-top: 30px; }

.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #eeeeee;
    margin-top: 60px;
    color: #888;
}

.footer p { margin: 5px 0; }
.footer-link {
    text-decoration: none;
    color: #888;
    font-size: 14px;
}
.footer-link:hover { color: #222; text-decoration: underline; }

@media (max-width: 768px) {
    .container { width: 92%; }
    
    .header .container { flex-direction: column; gap: 15px; }
    .navigation ul { justify-content: center; flex-wrap: wrap; gap: 15px; }
    .navigation li { margin: 0; }

    .product-content { flex-direction: column; }
    .product-gallery, .product-info { width: 100%; flex: none; }

    .slider-main-image { min-height: 350px; }
    
    h1, .hero h1 { font-size: 28px; text-align: center; }
    .product-info h1 { margin-top: 20px; }

    .cart-content { width: 85%; margin: 20% auto; padding: 20px; }
    .product-grid { grid-template-columns: 1fr; }
    
    .constructor-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
}

.header-actions {
    display: flex;
    align-items: center;
}

.cart-icon-link {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    border: 1px solid #222;
    padding: 8px 15px;
    border-radius: 20px;
    margin-left: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-icon-link:hover {
    background: #222;
    color: #fff;
}

.cart-modal {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}

.cart-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    text-align: center;
}

.cart-content h2 { margin-top: 0; }
.cart-content p { color: #666; font-size: 16px; margin-bottom: 30px; }

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    background: #222;
    color: #fff;
    padding: 15px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

.btn-secondary {
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    padding: 15px;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
}

.close-cart {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

.cart-page-container {
    padding: 60px 0;
    max-width: 800px;
    margin: 0 auto;
    width: 90%;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th { text-align: left; border-bottom: 2px solid #eee; padding: 10px; }
.cart-table td { border-bottom: 1px solid #eee; padding: 15px 10px; }

.cart-item-name b { display: block; font-size: 16px; }
.cart-item-desc { font-size: 13px; color: #777; }
.remove-btn { color: red; cursor: pointer; font-size: 20px; border: none; background: none; }

.cart-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    text-align: right;
}

.total-amount { font-size: 24px; font-weight: bold; display: block; margin: 10px 0 20px; }

.selection-area {
    min-height: 120px; 
    background: #fff;
    border: 2px dashed #ccc; 
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.selection-area.has-items {
    border-style: solid;
    border-color: #222;
    background: #fafafa;
    justify-content: flex-start; 
}

.empty-msg {
    color: #999;
    font-size: 14px;
    pointer-events: none;
}

.selected-thumb {
    width: 45px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.selected-thumb:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.selected-thumb {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}