* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background: #fff;
}

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

/* Header */
header {
    background: white;
    border-bottom: 1px solid #e9e9e9;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    font-size: 2em;
    color: #0078d4;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.main-menu {
    list-style: none;
    display: flex;
}

.main-menu li {
    position: relative;
    margin-left: 20px;
}

.main-menu a {
    color: #333;
    text-decoration: none;
    padding: 10px;
    display: block;
}

.main-menu a:hover {
    color: #0078d4;
}

.submenu {
    display: none;
    position: absolute;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    top: 100%;
    left: 0;
    z-index: 1000;
}

.dropdown:hover .submenu {
    display: block;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.submenu a:hover {
    background: #f8f8f8;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0078d4, #005a9e);
    color: white;
    padding: 100px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Slider */
.slider-section {
    padding: 0;
    width: 100%;
}

.slider {
    position: relative;
    overflow: hidden;
    min-height: 840px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 0;
    margin-bottom: 35px;
    box-shadow: none;
}

.slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #ffffff;
}

.slider .slide.active {
    opacity: 1;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    border: none;
    background: transparent;
    color: #ffffff;
    width: auto;
    height: auto;
    cursor: pointer;
    font-size: 4.4rem;
    line-height: 1;
    box-shadow: none;
    padding: 0;
    transition: color 0.3s, transform 0.3s;
}

.slider-arrow:hover {
    color: #dfefff;
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow-left {
    left: 28px;
}

.slider-arrow-right {
    right: 28px;
}

.slide-content {
    position: absolute;
    left: 42px;
    bottom: 42px;
    max-width: 520px;
    color: white;
    text-shadow: none;
    z-index: 2;
}

.slide-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.slide-content h3 {
    margin: 0 0 10px;
    font-size: 2.3rem;
    line-height: 1.15;
}

.slide-content p {
    margin: 0 0 22px;
    font-size: 1.08rem;
    line-height: 1.6;
}

.slider-nav {
    position: absolute;
    right: 28px;
    bottom: 28px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    transition: background 0.25s;
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.hero h2 {
    font-size: 3em;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-img {
    width: 100%;
    max-width: 580px;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
}

.image-placeholder {
    width: 100%;
    height: 300px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.5em;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: #A61B2B;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #8a1623;
}

.btn-secondary {
    display: inline-block;
    background: #0078d4;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #005a9e;
}

/* Categories */
.categories {
    padding: 80px 0 60px;
    background: #fff;
}

.categories h2 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.4em;
    color: #333;
}

.categories-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
    font-size: 1rem;
}

.category-carousel {
    overflow: hidden;
    width: 100%;
}

.category-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 28px;
    align-items: flex-start;
    transition: transform 0.6s ease;
    will-change: transform;
}

.category-item {
    text-decoration: none;
    color: inherit;
    text-align: center;
    display: block;
    flex: 0 0 210px;
}

.category-circle {
    width: 210px;
    height: 210px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e6e6e6;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 74%;
    transition: transform 0.25s ease, border-color 0.25s ease;
    display: block;
}

.category-item:hover .category-circle {
    transform: translateY(-4px);
    border-color: #cfd8e3;
}

.category-item h3 {
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 500;
    color: #203040;
    margin-bottom: 10px;
}

.category-link {
    display: inline-block;
    color: #0078d4;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Featured Products */
.featured-products {
    padding: 80px 0;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.5em;
    color: #333;
}

.recommended-intro {
    text-align: center;
    color: #666;
    margin-bottom: 34px;
}

.product-showcase {
    padding: 10px 0 90px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.showcase-panel {
    min-height: 310px;
    text-decoration: none;
    color: #111;
    position: relative;
    overflow: hidden;
    display: block;
    transition: transform 0.25s ease;
}

.showcase-panel:hover {
    transform: translateY(-3px);
}

.showcase-image-panel {
    background: #ffffff;
}

.showcase-text-panel {
    background: #fff;
    display: flex;
    align-items: center;
    padding: 48px 56px;
}

.showcase-visual {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.showcase-copy {
    max-width: 360px;
    position: relative;
    z-index: 1;
}

.showcase-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #111;
}

.showcase-panel h3 {
    font-size: 1.95rem;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #111;
    max-width: 320px;
}

.showcase-panel p {
    font-size: 1rem;
    line-height: 1.6;
    color: #2f3d4a;
    max-width: 380px;
}

.about-section {
    padding: 80px 0;
    background: #f8fafc;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 34px;
    align-items: start;
}

.about-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: #0078d4;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-copy h2 {
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #1f2f3f;
    max-width: 720px;
}

.about-copy p {
    color: #556575;
    line-height: 1.8;
    margin-bottom: 16px;
    max-width: 760px;
}

.about-highlights {
    display: grid;
    gap: 16px;
}

.about-visual {
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 8px;
    padding: 18px;
}

.about-visual-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.about-point {
    background: #fff;
    border: 1px solid #e7edf3;
    padding: 22px 20px;
    border-radius: 8px;
}

.about-point h3 {
    margin-bottom: 10px;
    color: #1f2f3f;
    font-size: 1.1rem;
}

.about-point p {
    color: #5f7080;
    line-height: 1.7;
}

.recommendations-viewport {
    overflow: hidden;
    width: 100%;
}

.recommendations-grid {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin: 0;
}

.recommendations-grid .recommendation-card {
    flex: 0 0 calc((100% - 90px) / 4);
}

.recommendations-enter {
    animation: recommendationsSlideRight 0.55s ease;
}

.recommendations-exit .recommendation-card,
.recommendation-zoom-out {
    animation: recommendationZoomOut 0.32s ease;
}

.recommendation-card {
    will-change: transform, opacity;
}

@keyframes recommendationsSlideRight {
    from {
        opacity: 0.6;
        transform: translateX(-42px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes recommendationZoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.65;
        transform: scale(0.92);
    }
}

.upload-form-featured {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto 40px;
}

.upload-form-featured h3 {
    margin-bottom: 20px;
    color: #0078d4;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.product-grid.recommendations-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin: 0;
}

.product-grid.recommendations-grid .recommendation-card {
    flex: 0 0 calc((100% - 90px) / 4);
}

.product-grid.single-product-view {
    grid-template-columns: minmax(280px, 420px);
    justify-content: center;
}

.auto-back-button {
    display: none;
    margin-bottom: 25px;
}

.product-grid.single-product-view .auto-back-button {
    display: inline-block;
}

.product {
    background: white;
    border-radius: 10px;
    border: 1px solid #ececec;
    box-shadow: none;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.product:hover {
    transform: translateY(-2px);
}

.product-image-placeholder {
    height: 200px;
    background: white;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    overflow: hidden;
}

.product h3 {
    margin: 25px 15px 12px;
    color: #0078d4;
    font-size: 1.15rem;
    line-height: 1.4;
}
.product-details {
    display: none;
    text-align: left;
    padding: 0 25px 20px;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.product-details p {
    margin: 0;
}
.product p {
    padding: 0 25px;
    margin-bottom: 25px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 60px;
}

.product .btn-primary,
.product .btn-secondary {
    margin-top: auto;
    align-self: center;
}

.btn-delete {
    background: #d32f2f !important;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-delete:hover {
    background: #b71c1c !important;
}

.admin-panel {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.admin-panel h3 {
    color: #0078d4;
    margin-bottom: 15px;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 15px;
}

.admin-count {
    color: #607282;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-dashboard {
    padding: 50px 0 80px;
    background: #f8fafc;
}

.admin-login-section {
    padding: 80px 0 110px;
    background: linear-gradient(180deg, #f8fafc 0%, #edf5fb 100%);
}

.admin-login-card {
    max-width: 460px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(22, 44, 74, 0.08);
    padding: 32px;
}

.admin-login-card h2 {
    color: #1f2f3f;
    margin-bottom: 10px;
}

.admin-login-card p {
    color: #5d6b79;
    line-height: 1.6;
    margin-bottom: 20px;
}

.admin-login-form {
    display: grid;
    gap: 14px;
}

.admin-hidden {
    display: none;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-header h2 {
    margin-bottom: 10px;
    font-size: 2.2rem;
    color: #1f2f3f;
}

.admin-header p {
    color: #556575;
    max-width: 720px;
}

.admin-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 24px;
    align-items: start;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.admin-image-preview-wrap {
    margin: -4px 0 16px;
}

.admin-image-preview {
    height: 180px;
    border: 1px dashed #cfd9e3;
    border-radius: 8px;
    background: #f8fbfd;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718394;
    font-weight: 600;
    text-align: center;
    padding: 16px;
}

.admin-image-preview.has-image {
    border-style: solid;
    color: transparent;
}

.admin-help {
    margin-top: 10px;
    color: #738394;
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-form-message {
    min-height: 24px;
    margin-top: 4px;
    font-size: 0.95rem;
    font-weight: 600;
}

.admin-form-message.success {
    color: #1f7a43;
}

.admin-form-message.error {
    color: #b42318;
}

.admin-form-message.info {
    color: #0078d4;
}

.admin-product-list {
    display: grid;
    gap: 14px;
}

.admin-product-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e6ebf0;
    border-radius: 8px;
    background: #fff;
}

.admin-product-meta {
    display: grid;
    gap: 8px;
}

.admin-product-meta strong {
    color: #1f2f3f;
}

.admin-product-meta span {
    color: #5d6b79;
    line-height: 1.5;
}

.admin-product-meta code {
    color: #0078d4;
    background: #f3f8fc;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.admin-product-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.admin-empty {
    color: #667788;
}

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

.dashboard .form-group label {
    font-weight: 600;
}

.dashboard .form-group input,
.dashboard .form-group textarea,
.dashboard .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#products-table ul {
    list-style: none;
    padding-left: 0;
}

#products-table li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #0078d4;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    .hero-content {
        max-width: 100%;
    }
    header .container {
        flex-direction: column;
    }
    .admin-header {
        flex-direction: column;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-product-item {
        flex-direction: column;
    }
    .admin-product-actions {
        width: 100%;
    }
    .main-menu {
        margin-top: 20px;
    }
    .slider {
        min-height: 640px;
    }
    .slide-content {
        left: 24px;
        right: 24px;
        bottom: 24px;
        max-width: none;
    }
    .slide-content h3 {
        font-size: 1.7rem;
    }
    .slide-content p {
        font-size: 0.98rem;
    }
    .slider-nav {
        right: 24px;
        bottom: 18px;
    }
    .slider-arrow {
        font-size: 3.4rem;
    }
    .slider-arrow-left {
        left: 14px;
    }
    .slider-arrow-right {
        right: 14px;
    }
    .product-grid.recommendations-grid .recommendation-card {
        flex-basis: 100%;
    }
    .recommended-intro {
        margin-bottom: 24px;
    }
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .showcase-panel {
        min-height: 260px;
    }
    .showcase-text-panel {
        padding: 28px 24px;
    }
    .showcase-panel h3 {
        font-size: 1.2rem;
    }
    .about-layout {
        grid-template-columns: 1fr;
    }
    .about-copy h2 {
        font-size: 1.7rem;
    }
}
