/*
Theme Name: Free Study Gujarat Team
Theme URI: https://freestudygujarat.com/
Author: Free Study Gujarat Team
Author URI: https://freestudygujarat.com/
Description: A clean marketplace-style WordPress theme inspired by a compact product grid storefront, branded for Free Study Gujarat Team with WooCommerce support, category navigation, mobile drawer menu, product cards, and study-resource starter pages.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: free-study-gujarat-team
Tags: e-commerce, education, custom-logo, featured-images, right-sidebar, responsive-layout
*/

:root {
    --bg: #f7fafc;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #4b5563;
    --soft: #e5e7eb;
    --soft-2: #f3f4f6;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --danger: #ef4444;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --container: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    letter-spacing: normal;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

iframe,
embed,
object,
video,
canvas {
    max-width: 100%;
}

body > *,
.site-header,
main,
.site-footer {
    max-width: 100%;
}

main {
    overflow-x: hidden;
}

.adsbygoogle,
ins.adsbygoogle,
.google-auto-placed,
.google-auto-placed > div,
[id^="google_ads_iframe"],
[id*="google_ads_iframe"],
iframe[id^="google_ads_iframe"],
iframe[src*="googlesyndication"],
iframe[src*="googleads"] {
    max-width: 100vw !important;
    overflow: hidden !important;
}

.adsbygoogle,
ins.adsbygoogle,
.google-auto-placed,
.google-auto-placed > div {
    width: min(100%, 100vw) !important;
}

.container {
    width: 100%;
    max-width: min(var(--container), 100%);
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: var(--shadow-lg);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1.1;
    font-weight: 700;
    white-space: normal;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link,
.category-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-link:hover,
.category-button:hover {
    color: #111827;
}

.category-menu {
    position: relative;
}

.category-button {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.category-menu:hover .chevron {
    transform: rotate(180deg);
}

.category-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 0.5rem);
    width: 14rem;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.5rem 0;
    background: var(--surface);
    border: 1px solid #f3f4f6;
    border-radius: 0.375rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transform-origin: top;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 55;
}

.category-menu:hover .category-dropdown,
.category-menu:focus-within .category-dropdown {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.custom-scroll::-webkit-scrollbar {
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.category-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

.category-link:hover {
    color: #2563eb;
    background: #f3f4f6;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-link {
    position: relative;
    display: inline-flex;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color 0.3s ease;
}

.cart-link:hover {
    color: #111827;
}

.cart-link svg,
.icon-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: var(--danger);
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.icon-button:focus-visible {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

.mobile-menu-button {
    display: inline-flex;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: var(--surface);
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--soft);
}

.sidebar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-nav {
    display: grid;
    gap: 0.5rem;
    padding: 1.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--muted);
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: var(--soft-2);
}

.sidebar-category-title {
    margin: 0;
    padding: 0 1.5rem 0.5rem;
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 700;
}

.sidebar-categories {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}

.fsgt-menu-open {
    overflow: hidden;
}

.section {
    width: 100%;
    max-width: min(var(--container), 100%);
    margin: 0 auto;
    padding: 3rem 1rem;
}

.section-flush {
    padding-top: 0;
    padding-bottom: 4rem;
}

.section-title {
    margin: 0 0 3rem;
    color: var(--text);
    text-align: center;
    font-size: 1.875rem;
    line-height: 1.2;
    font-weight: 700;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.product-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-image-link {
    display: block;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 13rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-image-link:hover .product-image {
    transform: scale(1.08);
}

.product-card-body {
    padding: 1.5rem;
    text-align: center;
}

.product-card-body > * {
    min-width: 0;
}

.product-title {
    min-height: 3.15rem;
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.product-price {
    display: block;
    margin-bottom: 1rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
}

.button,
.view-button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.view-button {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
}

.view-button:hover,
.button-primary:hover,
.primary-link:hover {
    background: var(--primary-dark);
}

.button {
    min-height: 2.5rem;
    padding: 0.75rem 2rem;
    border-radius: 999px;
}

.button-primary,
.primary-link {
    background: var(--primary);
    color: #ffffff;
}

.primary-link {
    min-height: 2.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.pagination button {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: var(--surface);
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #e5e7eb;
}

.pagination .active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.pagination button:disabled {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.loading-message,
.empty-message,
.product-detail-loading {
    grid-column: 1 / -1;
    padding: 2.5rem 1rem;
    color: #9ca3af;
    text-align: center;
}

.content-section {
    width: 100%;
    max-width: min(var(--container), 100%);
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}

.content-section h1 {
    margin: 0 0 1.5rem;
    color: var(--text);
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 700;
}

.content-section h2 {
    margin: 2rem 0 0.85rem;
    color: var(--text);
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 700;
}

.content-section h3 {
    margin: 1.25rem 0 0.45rem;
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 700;
}

.content-section p {
    max-width: 900px;
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.7;
}

.contact-layout {
    display: grid;
    gap: 3rem;
}

.contact-form {
    display: grid;
    gap: 0.75rem;
    max-width: 620px;
}

.contact-form label {
    color: var(--text);
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: var(--surface);
    padding: 0.85rem 1rem;
    color: var(--text);
}

.contact-form textarea {
    resize: vertical;
}

.form-status {
    min-height: 1.5rem;
    color: #047857;
    font-weight: 600;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.product-gallery {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.product-slide {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.slide-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slide-button:hover {
    background: #d1d5db;
}

.slide-prev {
    left: 0.5rem;
}

.slide-next {
    right: 0.5rem;
}

.product-info-card {
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

.product-info-card h1 {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.875rem;
    line-height: 1.15;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.detail-price {
    margin: 0 0 1rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
}

.quantity-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-button {
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 1.15rem;
    cursor: pointer;
}

.quantity-button:hover {
    background: #d1d5db;
}

.quantity-input {
    width: 3rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: var(--surface);
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.product-meta {
    margin: 0 0 1.5rem;
    color: #374151;
}

.product-meta p {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.product-meta ul {
    margin: 0;
    padding-left: 1.25rem;
}

.product-meta li {
    margin: 0.3rem 0;
}

.product-description {
    color: var(--muted);
    line-height: 1.7;
    white-space: pre-line;
}

.site-footer {
    border-radius: 0.5rem 0.5rem 0 0;
    background: var(--surface);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    padding: 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

.footer-title {
    margin: 0 0 1rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.footer-links {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: var(--muted);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #111827;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--soft);
    color: #6b7280;
    text-align: center;
    font-size: 0.875rem;
}

.fade-in {
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 640px) {
    .container,
    .section,
    .content-section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 520px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .container,
    .section,
    .content-section {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .brand {
        font-size: 1.875rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }

    .product-info-card {
        padding: 2rem;
    }

    .product-info-card h1 {
        font-size: 2.25rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        text-align: left;
    }

    .footer-links-wrap {
        text-align: center;
    }

    .contact-layout {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    }
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-menu-button {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .header-inner {
        min-height: 68px;
    }

    .brand {
        max-width: 220px;
        font-size: 1.2rem;
    }

    .product-card-body {
        padding: 1rem;
    }

    .product-title {
        font-size: 0.98rem;
    }

    .product-image {
        height: 11.5rem;
    }

    .view-button {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.admin-bar .site-header {
    top: 32px;
}

.admin-bar .sidebar {
    top: 32px;
    height: calc(100% - 32px);
}

.brand .custom-logo {
    width: auto;
    max-width: 260px;
    max-height: 52px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content ul,
.entry-content ol {
    color: var(--muted);
    line-height: 1.7;
}

.single-featured-image {
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.single-featured-image img {
    width: 100%;
    height: auto;
}

.card-excerpt {
    min-height: 3rem;
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.5;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: var(--surface);
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination .page-numbers.current {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.pagination .page-numbers:hover {
    background: #e5e7eb;
}

.fsgt-demo-art {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), #111827);
    color: #ffffff;
    font-weight: 700;
}

.fsgt-demo-art::before {
    content: "";
    position: absolute;
    width: 46%;
    aspect-ratio: 1;
    top: 15%;
    left: 27%;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.16);
}

.fsgt-demo-art::after {
    content: "";
    position: absolute;
    width: 28%;
    height: 11%;
    top: 56%;
    left: 36%;
    border-radius: 999px;
    background: var(--accent);
    box-shadow:
        0 -78px 0 -15px rgba(79, 70, 229, 0.18),
        0 -48px 0 -18px #cbd5e1,
        0 -24px 0 -18px #cbd5e1;
}

.fsgt-demo-art span {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}

.woocommerce-section {
    padding-top: 3rem;
}

.woocommerce .woocommerce-products-header__title,
.woocommerce div.product .product_title {
    margin: 0 0 2rem;
    color: var(--text);
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 700;
}

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    min-width: 0;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product a img {
    width: 100%;
    height: 13rem;
    margin: 0;
    object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 3.15rem;
    padding: 1.5rem 1.5rem 0;
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.4;
    font-weight: 600;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    display: block;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
}

.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    margin: 0 1.5rem 1.5rem;
    padding: 0.5rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    line-height: 1.2;
}

.woocommerce ul.products li.product .button {
    width: calc(100% - 3rem);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

.woocommerce .woocommerce-ordering select,
.woocommerce .quantity .qty {
    min-height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: var(--surface);
}

.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
    width: auto !important;
    float: none !important;
}

.woocommerce div.product div.images {
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.woocommerce div.product div.summary {
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

.woocommerce div.product .woocommerce-tabs,
.woocommerce div.product .related {
    grid-column: 1 / -1;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-top-color: var(--primary);
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .woocommerce div.product {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4rem;
    }

    .woocommerce div.product div.summary {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }

    .admin-bar .sidebar {
        top: 46px;
        height: calc(100% - 46px);
    }
}

.fsgt-single-product {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.fsgt-product-gallery,
.fsgt-product-summary,
.fsgt-cart-card,
.fsgt-delivery-card,
.fsgt-order-summary,
.fsgt-thanks-card {
    border-radius: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.fsgt-product-gallery {
    position: relative;
    overflow: hidden;
    align-self: start;
}

.fsgt-product-gallery img,
.fsgt-product-gallery .fsgt-demo-art {
    width: 100%;
    min-height: 320px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.fsgt-sale-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: #9a9500;
    color: #ffffff;
    font-weight: 700;
}

.fsgt-gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    box-shadow: var(--shadow-md);
}

.fsgt-gallery-prev {
    left: 1rem;
}

.fsgt-gallery-next {
    right: 1rem;
}

.fsgt-product-summary {
    padding: 1.5rem;
}

.fsgt-product-summary h1 {
    margin: 0 0 1rem;
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 700;
}

.fsgt-price {
    margin-bottom: 1.5rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
}

.fsgt-price del {
    color: #6b7280;
}

.fsgt-price ins {
    text-decoration: none;
}

.fsgt-short-description,
.fsgt-product-description {
    color: var(--muted);
    line-height: 1.7;
}

.fsgt-product-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.fsgt-product-cart input[type="number"] {
    width: 4.25rem;
    min-height: 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
}

.fsgt-product-meta {
    margin: 1.5rem 0;
    color: #374151;
}

.fsgt-product-meta p {
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.fsgt-product-meta ul {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.7;
}

.fsgt-cart-page,
.fsgt-checkout-page,
.fsgt-thanks-page {
    min-height: 56vh;
}

.fsgt-cart-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.fsgt-cart-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--soft);
}

.fsgt-cart-row:first-child {
    padding-top: 0;
}

.fsgt-cart-thumb img {
    width: 72px;
    height: 72px;
    border-radius: 0.375rem;
    object-fit: cover;
}

.fsgt-cart-info h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.fsgt-cart-info p,
.fsgt-cart-info span {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.fsgt-cart-price {
    color: #111827;
    font-weight: 700;
}

.fsgt-cart-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.fsgt-cart-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    cursor: pointer;
}

.fsgt-cart-actions span {
    min-width: 2rem;
    text-align: center;
    font-weight: 700;
}

.fsgt-cart-actions .fsgt-remove {
    margin-left: 0.5rem;
    background: transparent;
    color: #111827;
    font-size: 1.25rem;
}

.fsgt-cart-totals {
    display: grid;
    gap: 0.75rem;
    padding-top: 1.25rem;
}

.fsgt-cart-totals div,
.fsgt-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.fsgt-cart-totals .total,
.fsgt-summary-line.total {
    padding-top: 1rem;
    border-top: 1px solid var(--soft);
    font-size: 1.125rem;
}

.fsgt-cart-totals .discount {
    color: #dc2626;
}

.fsgt-cart-cta {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.fsgt-empty-cart {
    text-align: center;
}

.fsgt-empty-cart h1,
.fsgt-empty-cart h2 {
    margin-top: 0;
}

.fsgt-checkout-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 560px;
    margin: 0 auto 2rem;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
}

.fsgt-checkout-steps div {
    position: relative;
}

.fsgt-checkout-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.5rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #6b7280;
    font-weight: 700;
}

.fsgt-checkout-steps .active span {
    background: var(--primary);
    color: #ffffff;
}

.fsgt-checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.fsgt-order-summary,
.fsgt-delivery-card {
    padding: 1.5rem;
}

.fsgt-order-summary h2,
.fsgt-delivery-card h1 {
    margin-top: 0;
}

.fsgt-summary-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--soft);
}

.fsgt-summary-image {
    position: relative;
}

.fsgt-summary-image img {
    width: 58px;
    height: 58px;
    border-radius: 0.375rem;
    object-fit: cover;
}

.fsgt-summary-image span {
    position: absolute;
    top: -0.45rem;
    right: -0.45rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.35rem;
}

.fsgt-summary-item p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.fsgt-summary-line {
    padding: 0.75rem 0;
}

.fsgt-delivery-card h3 {
    margin: 1.5rem 0 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.fsgt-delivery-card label {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
}

.fsgt-delivery-card input {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    color: var(--text);
}

.fsgt-field-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.fsgt-shipping-option {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    padding: 1rem;
    border: 2px solid #1f2937;
    border-radius: 0.5rem;
}

.fsgt-submit-order {
    width: 100%;
}

.fsgt-info-note {
    margin-top: 1rem;
    border-left: 3px solid var(--primary);
    border-radius: 0.5rem;
    background: #eef2ff;
    padding: 1rem;
    color: #374151;
    font-size: 0.875rem;
}

.fsgt-info-note p {
    margin-bottom: 0;
}

.fsgt-thanks-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fsgt-thanks-card {
    width: min(100%, 560px);
    padding: 4rem 2rem;
    text-align: center;
}

.fsgt-thanks-card h1 {
    margin-top: 0;
    font-size: 2rem;
}

.fsgt-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0b63ce;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    font-weight: 700;
}

.fsgt-thanks-small {
    color: var(--muted);
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .fsgt-cart-row {
        grid-template-columns: 72px minmax(0, 1fr) auto auto;
    }

    .fsgt-field-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .fsgt-single-product {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
        gap: 4rem;
    }

    .fsgt-product-summary {
        padding: 2rem;
    }

    .fsgt-product-summary h1 {
        font-size: 2.5rem;
    }

    .fsgt-checkout-layout {
        grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.55fr);
    }

    .fsgt-order-summary {
        position: sticky;
        top: 6rem;
    }
}

@media (max-width: 767px) {
    .container,
    .section,
    .content-section {
        max-width: 100vw;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section {
        padding-top: 2.25rem;
        padding-bottom: 2.75rem;
    }

    .section-title {
        margin-bottom: 1.75rem;
        font-size: 2rem;
    }

    .site-header {
        border-radius: 0 0 0.5rem 0.5rem;
    }

    .header-inner {
        width: 100%;
        gap: 0.75rem;
        padding-top: 0.9rem;
        padding-bottom: 0.9rem;
    }

    .brand {
        max-width: calc(100vw - 7rem);
        font-size: 1.15rem;
    }

    .header-actions {
        flex: 0 0 auto;
        gap: 0.5rem;
    }

    .product-grid,
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .product-card,
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        max-width: 480px;
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .product-image,
    .woocommerce ul.products li.product a img {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .woocommerce .woocommerce-result-count,
    .woocommerce .woocommerce-ordering {
        float: none;
        width: 100%;
    }

    .woocommerce .woocommerce-ordering select {
        width: 100%;
    }

    .fsgt-product-cart {
        align-items: stretch;
        flex-direction: column;
    }

    .fsgt-product-cart input[type="number"] {
        width: 100%;
    }

    .fsgt-cart-row {
        align-items: start;
    }

    .fsgt-cart-price,
    .fsgt-cart-actions {
        grid-column: 2;
    }

    .fsgt-checkout-layout {
        display: flex;
        flex-direction: column;
    }

    .fsgt-order-summary {
        order: 2;
    }

    .fsgt-delivery-card {
        order: 1;
    }
}

@media (max-width: 420px) {
    .brand,
    .brand .custom-logo {
        max-width: calc(100vw - 6.25rem);
    }

    .brand .custom-logo {
        max-height: 46px;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .cart-link {
        width: 1.5rem;
        height: 1.5rem;
    }

    .icon-button {
        width: 2.25rem;
        height: 2.25rem;
    }

    .cart-link svg,
    .icon-button svg {
        width: 1.35rem;
        height: 1.35rem;
    }

    .sidebar {
        width: min(86vw, 320px);
    }

    .fsgt-summary-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .fsgt-summary-item > strong {
        grid-column: 2;
        justify-self: start;
    }
}
